using System;
using System.Collections.Generic;
using System.Windows;
namespace MicroMsg.UI.UserContrl
{
	public static class EnumerableTreeExtensions
	{
		private static IEnumerable<DependencyObject> DrillDown(this IEnumerable<DependencyObject> items, Func<DependencyObject, IEnumerable<DependencyObject>> function)
		{
			EnumerableTreeExtensions.<DrillDown>d__0 <DrillDown>d__ = new EnumerableTreeExtensions.<DrillDown>d__0(-2);
			<DrillDown>d__.<>3__items = items;
			<DrillDown>d__.<>3__function = function;
			return <DrillDown>d__;
		}
		public static IEnumerable<DependencyObject> DrillDown<T>(this IEnumerable<DependencyObject> items, Func<DependencyObject, IEnumerable<DependencyObject>> function) where T : DependencyObject
		{
			EnumerableTreeExtensions.<DrillDown>d__9<T> <DrillDown>d__ = new EnumerableTreeExtensions.<DrillDown>d__9<T>(-2);
			<DrillDown>d__.<>3__items = items;
			<DrillDown>d__.<>3__function = function;
			return <DrillDown>d__;
		}
		public static IEnumerable<DependencyObject> Descendants(this IEnumerable<DependencyObject> items)
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.Descendants());
		}
		public static IEnumerable<DependencyObject> DescendantsAndSelf(this IEnumerable<DependencyObject> items)
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.DescendantsAndSelf());
		}
		public static IEnumerable<DependencyObject> Ancestors(this IEnumerable<DependencyObject> items)
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.Ancestors());
		}
		public static IEnumerable<DependencyObject> AncestorsAndSelf(this IEnumerable<DependencyObject> items)
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.AncestorsAndSelf());
		}
		public static IEnumerable<DependencyObject> Elements(this IEnumerable<DependencyObject> items)
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.Elements());
		}
		public static IEnumerable<DependencyObject> ElementsAndSelf(this IEnumerable<DependencyObject> items)
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.ElementsAndSelf());
		}
		public static IEnumerable<DependencyObject> Descendants<T>(this IEnumerable<DependencyObject> items) where T : DependencyObject
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.Descendants());
		}
		public static IEnumerable<DependencyObject> DescendantsAndSelf<T>(this IEnumerable<DependencyObject> items) where T : DependencyObject
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.DescendantsAndSelf());
		}
		public static IEnumerable<DependencyObject> Ancestors<T>(this IEnumerable<DependencyObject> items) where T : DependencyObject
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.Ancestors());
		}
		public static IEnumerable<DependencyObject> AncestorsAndSelf<T>(this IEnumerable<DependencyObject> items) where T : DependencyObject
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.AncestorsAndSelf());
		}
		public static IEnumerable<DependencyObject> Elements<T>(this IEnumerable<DependencyObject> items) where T : DependencyObject
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.Elements());
		}
		public static IEnumerable<DependencyObject> ElementsAndSelf<T>(this IEnumerable<DependencyObject> items) where T : DependencyObject
		{
			return items.DrillDown((DependencyObject dependencyObject_0) => dependencyObject_0.ElementsAndSelf());
		}
	}
}
